import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

import PageList from "./modules/pageList";
import Tabbar from "./modules/tabbar";
import ErrPage from "./modules/errPage";
const routes = [
  {
    path: "/",
    redirect:'/home',
    meta: {
      title: "首页",
    },
  },
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
    },
  },
  ...Tabbar,
  ...PageList,
  ...ErrPage,
];

const router = new VueRouter({
  mode: "hash",
  // mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
